<?php

CVarDumper::dump($model->fitofarmacos);

$this->widget('zii.widgets.grid.CGridView', array(
    'id' => 'fitofarmaco-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
    'columns' => array(
        array(// this is for your related group members of the current group
            'name' => 'fitofarmacos.nome', // this will access the attributeLabel from the member model class, and assign it to your column header
            'value' => '$data->fitofarmacos[0]->nome', // this will access the current group's 1st member and give out the firstname of that member
            'type' => 'raw' // this tells that the value type is raw and no formatting is to be applied to it
        ),
        array(// this is for your related group members of the current group
            'name' => 'fitofarmacos.descricao', // this will access the attributeLabel from the member model class, and assign it to your column header
            'value' => '$data->fitofarmacos[0]->descricao', // this will access the current group's 1st member and give out the firstname of that member
            'type' => 'raw' // this tells that the value type is raw and no formatting is to be applied to it
        ),
        //'id',
//        'metodo_acao_id',
//        'nome',
//        'tipo_formulação',
//        'descricao',
//        'ficha_tecnica',
        /*
          'active',
          'created_at',
          'updated_at',
         */
        array(
            'class' => 'CButtonColumn',
        ),
    ),
));
?>
